package com.qidian.mes.qc.service.impl;/**
 * ClassName:UncheckTaskImpl
 * Package:com.qidian.mes.qc.service.impl
 **/

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qidian.mes.pojo.UncheckTask;
import com.qidian.mes.qc.mapper.UncheckTaskMapper;
import com.qidian.mes.qc.service.UncheckTaskService;
import com.qidian.mes.util.pojo.QdResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author ppc
 * @Conpany study
 * @Description:
 * @Time 2024/4/17 17:16
 *
 **/
@Service
public class UncheckTaskServiceImpl implements UncheckTaskService {
    @Autowired
    private UncheckTaskMapper uncheckTaskMapper;
    @Override
    public QdResult<PageInfo<UncheckTask>> queryByPage(UncheckTask uncheckTask, Integer page, Integer limit) {
        PageHelper.startPage(page,limit);
        List<UncheckTask> uncheckTasks = uncheckTaskMapper.queryByPage(uncheckTask);
        PageInfo<UncheckTask> pageInfo = new PageInfo<>(uncheckTasks);
        return QdResult.success(pageInfo);
    }

    @Override
    public QdResult save(UncheckTask uncheckTask) {
        uncheckTaskMapper.save(uncheckTask);
        return QdResult.success();
    }

    @Override
    public QdResult delete(Long invoicesId) {
        uncheckTaskMapper.delete(invoicesId);
        return QdResult.success();
    }

    @Override
    public QdResult deletes(Long[] invoicesIds) {
        uncheckTaskMapper.deletes(invoicesIds);
        return QdResult.success();
    }

    @Override
    public QdResult update(UncheckTask uncheckTask) {
        return null;
    }
}
